
#include <stdio.h>
#include <stdlib.h>

#include "gkscore.h"

static int psmap[32] = {22, 9,  5, 14, 18, 26, 13, 1, 24, 11, 7, 16, 20, 28, 13, 3,
                        23, 10, 6, 15, 19, 27, 13, 2, 25, 12, 8, 17, 21, 29, 13, 4};

static int widths[31][256] = {
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 333, 408, 500, 500, 833, 778, 333, 333, 333, 500, 564,
     250, 333, 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 278, 278, 564, 564, 564, 444, 921, 722,
     667, 667, 722, 611, 556, 722, 722, 333, 389, 722, 611, 889, 722, 722, 556, 722, 667, 556, 611, 722, 722, 944,
     722, 722, 611, 333, 278, 333, 469, 500, 333, 444, 500, 444, 500, 444, 333, 500, 500, 278, 278, 500, 278, 778,
     500, 500, 500, 500, 333, 389, 278, 500, 500, 722, 500, 500, 444, 480, 200, 480, 541, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 333, 500, 500, 167, 500, 200, 500, 500, 760, 444, 500, 564, 333, 760, 556,
     400, 564, 300, 300, 250, 500, 453, 350, 333, 300, 444, 500, 750, 750, 750, 444, 722, 722, 722, 722, 722, 722,
     333, 667, 611, 611, 611, 611, 333, 333, 333, 333, 722, 722, 722, 722, 722, 722, 722, 564, 255, 722, 722, 722,
     722, 722, 556, 255, 444, 444, 444, 444, 444, 444, 255, 444, 444, 444, 444, 444, 278, 278, 278, 278, 500, 500,
     500, 500, 500, 500, 500, 564, 278, 500, 500, 500, 500, 500, 500, 500},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 333, 420, 500, 500, 833, 778, 333, 333, 333, 500, 675,
     250, 333, 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 333, 333, 675, 675, 675, 500, 920, 611,
     611, 667, 722, 611, 611, 722, 722, 333, 444, 667, 556, 833, 667, 722, 611, 722, 611, 500, 556, 722, 611, 833,
     611, 556, 556, 389, 278, 389, 422, 500, 333, 500, 500, 444, 500, 444, 278, 500, 500, 278, 278, 444, 278, 722,
     500, 500, 500, 500, 389, 389, 278, 500, 444, 667, 444, 444, 389, 400, 275, 400, 541, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 389, 500, 500, 167, 500, 275, 500, 500, 760, 556, 500, 675, 333, 760, 500,
     400, 675, 300, 300, 250, 500, 523, 350, 333, 300, 556, 500, 750, 750, 750, 500, 611, 611, 611, 611, 611, 611,
     333, 667, 611, 611, 611, 611, 333, 333, 333, 333, 722, 667, 722, 722, 722, 722, 722, 675, 255, 722, 722, 722,
     722, 556, 611, 255, 500, 500, 500, 500, 500, 500, 255, 444, 444, 444, 444, 444, 278, 278, 278, 278, 500, 500,
     500, 500, 500, 500, 500, 675, 278, 500, 500, 500, 500, 444, 500, 444},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,  255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 333, 555, 500, 500, 1000, 833, 333, 333, 333, 500, 570,
     250, 333, 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 333, 333,  570, 570, 570, 500, 930, 722,
     667, 722, 722, 667, 611, 778, 778, 389, 500, 778, 667, 944, 722, 778, 611, 778,  722, 556, 667, 722, 722, 1000,
     722, 722, 667, 333, 278, 333, 581, 500, 333, 500, 556, 444, 556, 444, 333, 500,  556, 278, 333, 556, 278, 833,
     556, 500, 556, 556, 444, 389, 333, 556, 500, 722, 500, 500, 444, 394, 220, 394,  520, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,  255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 333, 500, 500, 167, 500, 220, 500, 500, 747,  500, 500, 570, 333, 747, 556,
     400, 570, 300, 300, 250, 556, 540, 350, 333, 300, 500, 500, 750, 750, 750, 500,  722, 722, 722, 722, 722, 722,
     333, 722, 667, 667, 667, 667, 389, 389, 389, 389, 722, 722, 778, 778, 778, 778,  778, 570, 255, 722, 722, 722,
     722, 722, 611, 255, 500, 500, 500, 500, 500, 500, 255, 444, 444, 444, 444, 444,  278, 278, 278, 278, 500, 556,
     500, 500, 500, 500, 500, 570, 278, 556, 556, 556, 556, 500, 556, 500},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 389, 555, 500, 500, 833, 778, 333, 333, 333, 500, 570,
     250, 333, 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 333, 333, 570, 570, 570, 500, 832, 667,
     667, 667, 722, 667, 667, 722, 778, 389, 500, 667, 611, 889, 722, 722, 611, 722, 667, 556, 611, 722, 667, 889,
     667, 611, 611, 333, 278, 333, 570, 500, 333, 500, 500, 444, 500, 444, 333, 500, 556, 278, 278, 500, 278, 778,
     556, 500, 500, 500, 389, 389, 278, 556, 444, 667, 500, 444, 389, 348, 220, 348, 570, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 389, 500, 500, 167, 500, 220, 500, 500, 747, 500, 500, 606, 333, 747, 556,
     400, 570, 300, 300, 250, 576, 500, 350, 333, 300, 500, 500, 750, 750, 750, 500, 667, 667, 667, 667, 667, 667,
     333, 667, 667, 667, 667, 667, 389, 389, 389, 389, 722, 722, 722, 722, 722, 722, 722, 570, 255, 722, 722, 722,
     722, 611, 611, 255, 500, 500, 500, 500, 500, 500, 255, 444, 444, 444, 444, 444, 278, 278, 278, 278, 500, 556,
     500, 500, 500, 500, 500, 570, 278, 556, 556, 556, 556, 444, 500, 444},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,  255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 278, 278, 355, 556, 556, 889, 667, 222, 333, 333, 389,  584,
     278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 278, 278, 584, 584, 584, 556, 1015, 667,
     667, 722, 722, 667, 611, 778, 722, 278, 500, 667, 556, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667,  944,
     667, 667, 611, 278, 278, 278, 469, 556, 222, 556, 556, 500, 556, 556, 278, 556, 556, 222, 222, 500, 222,  833,
     556, 556, 556, 556, 333, 500, 278, 556, 500, 722, 500, 500, 500, 334, 260, 334, 584, 255, 255, 255, 255,  255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,  255,
     255, 255, 255, 255, 255, 255, 255, 333, 556, 556, 167, 556, 260, 556, 556, 737, 333, 556, 584, 333, 737,  500,
     400, 584, 333, 333, 278, 556, 537, 350, 222, 333, 333, 556, 834, 834, 834, 611, 667, 667, 667, 667, 667,  667,
     333, 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 255, 722, 722,  722,
     722, 667, 667, 255, 556, 556, 556, 556, 556, 556, 255, 500, 556, 556, 556, 556, 278, 278, 278, 278, 556,  556,
     556, 556, 556, 556, 556, 584, 222, 556, 556, 556, 556, 500, 556, 500},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,  255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 278, 278, 355, 556, 556, 889, 667, 222, 333, 333, 389,  584,
     278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 278, 278, 584, 584, 584, 556, 1015, 667,
     667, 722, 722, 667, 611, 778, 722, 278, 500, 667, 556, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667,  944,
     667, 667, 611, 278, 278, 278, 469, 556, 222, 556, 556, 500, 556, 556, 278, 556, 556, 222, 222, 500, 222,  833,
     556, 556, 556, 556, 333, 500, 278, 556, 500, 722, 500, 500, 500, 334, 260, 334, 584, 255, 255, 255, 255,  255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,  255,
     255, 255, 255, 255, 255, 255, 255, 333, 556, 556, 167, 556, 260, 556, 556, 737, 333, 556, 584, 333, 737,  500,
     400, 584, 333, 333, 278, 556, 537, 350, 222, 333, 333, 556, 834, 834, 834, 611, 667, 667, 667, 667, 667,  667,
     333, 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 255, 722, 722,  722,
     722, 667, 667, 255, 556, 556, 556, 556, 556, 556, 255, 500, 556, 556, 556, 556, 278, 278, 278, 278, 556,  556,
     556, 556, 556, 556, 556, 584, 222, 556, 556, 556, 556, 500, 556, 500},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 278, 333, 474, 556, 556, 889, 722, 278, 333, 333, 389, 584,
     278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 333, 333, 584, 584, 584, 611, 975, 722,
     722, 722, 722, 667, 611, 778, 722, 278, 556, 722, 611, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944,
     667, 667, 611, 333, 278, 333, 584, 556, 278, 556, 611, 556, 611, 556, 333, 611, 611, 278, 278, 556, 278, 889,
     611, 611, 611, 611, 389, 556, 333, 611, 556, 778, 556, 556, 500, 389, 280, 389, 584, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 333, 556, 556, 167, 556, 280, 556, 556, 737, 500, 556, 584, 333, 737, 611,
     400, 584, 333, 333, 278, 611, 556, 350, 278, 333, 500, 556, 834, 834, 834, 611, 722, 722, 722, 722, 722, 722,
     333, 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 255, 722, 722, 722,
     722, 667, 667, 255, 556, 556, 556, 556, 556, 556, 255, 556, 556, 556, 556, 556, 278, 278, 278, 278, 611, 611,
     611, 611, 611, 611, 611, 584, 278, 611, 611, 611, 611, 556, 611, 556},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 278, 333, 474, 556, 556, 889, 722, 278, 333, 333, 389, 584,
     278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 333, 333, 584, 584, 584, 611, 975, 722,
     722, 722, 722, 667, 611, 778, 722, 278, 556, 722, 611, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944,
     667, 667, 611, 333, 278, 333, 584, 556, 278, 556, 611, 556, 611, 556, 333, 611, 611, 278, 278, 556, 278, 889,
     611, 611, 611, 611, 389, 556, 333, 611, 556, 778, 556, 556, 500, 389, 280, 389, 584, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 333, 556, 556, 167, 556, 280, 556, 556, 737, 500, 556, 584, 333, 737, 611,
     400, 584, 333, 333, 278, 611, 556, 350, 278, 333, 500, 556, 834, 834, 834, 611, 722, 722, 722, 722, 722, 722,
     333, 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 255, 722, 722, 722,
     722, 667, 667, 255, 556, 556, 556, 556, 556, 556, 255, 556, 556, 556, 556, 556, 278, 278, 278, 278, 611, 611,
     611, 611, 611, 611, 611, 584, 278, 611, 611, 611, 611, 556, 611, 556},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 255, 600, 600, 600,
     600, 600, 600, 255, 600, 600, 600, 600, 600, 600, 255, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 255, 600, 600, 600,
     600, 600, 600, 255, 600, 600, 600, 600, 600, 600, 255, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 255, 600, 600, 600,
     600, 600, 600, 255, 600, 600, 600, 600, 600, 600, 255, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 255, 600, 600, 600,
     600, 600, 600, 255, 600, 600, 600, 600, 600, 600, 255, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
     600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,  255, 255,  255, 255, 255,  255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 333, 713,  500, 549,  833, 778, 439,  333, 333, 500, 549,
     250, 549, 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500,  500, 278,  278, 549, 549,  549, 444, 549, 722,
     667, 722, 612, 611, 763, 603, 722, 333, 631, 722, 686, 889, 722,  722, 768,  741, 556, 592,  611, 690, 439, 768,
     645, 795, 611, 333, 863, 333, 658, 500, 500, 631, 549, 549, 494,  439, 521,  411, 603, 329,  603, 549, 549, 576,
     521, 549, 549, 521, 549, 603, 439, 576, 713, 686, 493, 686, 494,  480, 200,  480, 549, 255,  255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,  255, 255,  255, 255, 255,  255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 620, 247, 549, 167, 713, 500,  753, 753,  753, 753, 1042, 987, 603, 987, 603,
     400, 549, 411, 549, 549, 713, 494, 460, 549, 549, 549, 549, 1000, 603, 1000, 658, 823, 686,  795, 987, 768, 768,
     823, 768, 768, 713, 713, 713, 713, 713, 713, 713, 768, 713, 790,  790, 890,  823, 549, 250,  713, 603, 603, 1042,
     987, 603, 987, 603, 494, 329, 790, 790, 786, 713, 384, 384, 384,  384, 384,  384, 494, 494,  494, 494, 255, 329,
     274, 686, 686, 686, 384, 384, 384, 384, 384, 384, 494, 494, 494,  255},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 320, 300, 380, 620, 620, 900, 800, 220, 300, 300, 440, 600,
     320, 400, 320, 600, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 320, 320, 600, 600, 600, 540, 820, 680,
     740, 740, 800, 720, 640, 800, 800, 340, 600, 720, 600, 920, 740, 800, 620, 820, 720, 660, 620, 780, 700, 960,
     720, 640, 640, 300, 600, 300, 600, 500, 220, 580, 620, 520, 620, 520, 320, 540, 660, 300, 300, 620, 300, 940,
     660, 560, 620, 580, 440, 520, 380, 680, 520, 780, 560, 540, 480, 280, 600, 280, 600, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 300, 620, 620, 140, 620, 600, 520, 620, 740, 400, 360, 600, 240, 740, 620,
     400, 600, 372, 372, 320, 680, 600, 460, 220, 372, 400, 360, 930, 930, 930, 540, 680, 680, 680, 680, 680, 680,
     460, 740, 720, 720, 720, 720, 340, 340, 340, 340, 800, 740, 800, 800, 800, 800, 800, 600, 255, 780, 780, 780,
     780, 640, 620, 255, 580, 580, 580, 580, 580, 580, 255, 520, 520, 520, 520, 520, 300, 300, 300, 300, 560, 660,
     560, 560, 560, 560, 560, 600, 320, 680, 680, 680, 680, 540, 620, 540},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 300, 320, 360, 620, 620, 800, 820, 280, 280, 280, 440, 600,
     300, 320, 300, 600, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 300, 300, 600, 600, 600, 540, 780, 700,
     720, 720, 740, 680, 620, 760, 800, 320, 560, 720, 580, 860, 720, 760, 600, 780, 700, 640, 600, 720, 680, 960,
     700, 660, 580, 260, 600, 260, 600, 500, 280, 620, 600, 480, 640, 540, 340, 560, 620, 280, 280, 600, 280, 880,
     620, 540, 600, 560, 400, 540, 340, 620, 540, 880, 540, 600, 520, 360, 600, 380, 600, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 320, 620, 620, 20,  620, 600, 620, 620, 740, 440, 300, 600, 180, 740, 660,
     400, 600, 372, 372, 300, 620, 620, 460, 320, 372, 440, 300, 930, 930, 930, 540, 700, 700, 700, 700, 700, 700,
     440, 720, 680, 680, 680, 680, 320, 320, 320, 320, 740, 720, 760, 760, 760, 760, 760, 600, 255, 720, 720, 720,
     720, 660, 600, 255, 620, 620, 620, 620, 620, 620, 255, 480, 540, 540, 540, 540, 280, 280, 280, 280, 540, 620,
     540, 540, 540, 540, 540, 600, 340, 620, 620, 620, 620, 600, 600, 600},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 340, 360, 420, 660, 660, 940, 800, 320, 320, 320, 460, 600,
     340, 360, 340, 600, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 340, 340, 600, 600, 600, 660, 820, 720,
     720, 740, 780, 720, 680, 780, 820, 400, 640, 800, 640, 940, 740, 800, 660, 800, 780, 660, 700, 740, 720, 940,
     780, 700, 640, 300, 600, 300, 600, 500, 320, 580, 600, 580, 640, 580, 380, 580, 680, 360, 340, 660, 340, 1000,
     680, 620, 640, 620, 460, 520, 460, 660, 600, 800, 600, 620, 560, 320, 600, 320, 600, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 360, 660, 660, 120, 660, 600, 600, 660, 740, 540, 400, 600, 220, 740, 740,
     400, 600, 396, 396, 340, 660, 800, 460, 320, 396, 540, 400, 990, 990, 990, 660, 720, 720, 720, 720, 720, 720,
     500, 740, 720, 720, 720, 720, 400, 400, 400, 400, 780, 740, 800, 800, 800, 800, 800, 600, 255, 740, 740, 740,
     740, 700, 660, 255, 580, 580, 580, 580, 580, 580, 255, 580, 580, 580, 580, 580, 360, 360, 360, 360, 620, 680,
     620, 620, 620, 620, 620, 600, 340, 660, 660, 660, 660, 620, 640, 620},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,  255,  255,  255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 340, 320, 380,  680,  680,  880, 980, 320, 260, 260, 460, 600,
     340, 280, 340, 360, 680, 680, 680, 680, 680, 680, 680, 680, 680,  680,  340,  340, 620, 600, 620, 620, 780, 720,
     720, 700, 760, 720, 660, 760, 800, 380, 620, 780, 640, 860, 740,  760,  640,  760, 740, 700, 700, 740, 660, 1000,
     740, 660, 680, 260, 580, 260, 620, 500, 320, 680, 600, 560, 680,  560,  420,  620, 700, 380, 320, 700, 380, 960,
     680, 600, 660, 620, 500, 540, 440, 680, 540, 860, 620, 600, 560,  300,  620,  300, 620, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,  255,  255,  255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 320, 680, 680, 120, 680, 620,  620,  680,  780, 520, 380, 620, 220, 780, 820,
     400, 600, 408, 408, 340, 680, 680, 360, 300, 408, 520, 380, 1020, 1020, 1020, 620, 720, 720, 720, 720, 720, 720,
     460, 700, 720, 720, 720, 720, 380, 380, 380, 380, 760, 740, 760,  760,  760,  760, 760, 600, 255, 740, 740, 740,
     740, 660, 640, 255, 680, 680, 680, 680, 680, 680, 255, 560, 560,  560,  560,  560, 380, 380, 380, 380, 600, 680,
     600, 600, 600, 600, 600, 600, 380, 680, 680, 680, 680, 600, 660,  600},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 278, 296, 389, 556, 556, 833, 815, 204, 333, 333, 500, 606,
     278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 278, 278, 606, 606, 606, 444, 737, 722,
     722, 722, 778, 722, 667, 778, 833, 407, 556, 778, 667, 944, 815, 778, 667, 778, 722, 630, 667, 815, 722, 981,
     704, 704, 611, 333, 606, 333, 606, 500, 204, 556, 556, 444, 574, 500, 333, 537, 611, 315, 296, 593, 315, 889,
     611, 500, 574, 556, 444, 463, 389, 611, 537, 778, 537, 537, 481, 333, 606, 333, 606, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 296, 556, 556, 167, 556, 606, 500, 556, 737, 389, 426, 606, 259, 737, 611,
     400, 606, 333, 333, 278, 611, 606, 606, 204, 333, 389, 426, 834, 834, 834, 444, 722, 722, 722, 722, 722, 722,
     333, 722, 722, 722, 722, 722, 407, 407, 407, 407, 778, 815, 778, 778, 778, 778, 778, 606, 255, 815, 815, 815,
     815, 704, 667, 255, 556, 556, 556, 556, 556, 556, 255, 444, 500, 500, 500, 500, 315, 315, 315, 315, 500, 611,
     500, 500, 500, 500, 500, 606, 315, 611, 611, 611, 611, 537, 574, 537},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 278, 333, 400, 556, 556, 833, 852, 204, 333, 333, 500, 606,
     278, 333, 278, 606, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 278, 278, 606, 606, 606, 444, 747, 704,
     722, 722, 778, 722, 667, 778, 833, 407, 611, 741, 667, 944, 815, 778, 667, 778, 741, 667, 685, 815, 704, 926,
     704, 685, 667, 333, 606, 333, 606, 500, 204, 574, 556, 444, 611, 444, 333, 537, 611, 333, 315, 556, 333, 889,
     611, 500, 574, 556, 444, 444, 352, 611, 519, 778, 500, 500, 463, 333, 606, 333, 606, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 333, 556, 556, 167, 556, 606, 500, 556, 747, 389, 426, 606, 333, 747, 611,
     400, 606, 333, 333, 278, 611, 650, 606, 204, 333, 389, 426, 834, 834, 834, 444, 704, 704, 704, 704, 704, 704,
     333, 722, 722, 722, 722, 722, 407, 407, 407, 407, 778, 815, 778, 778, 778, 778, 778, 606, 255, 815, 815, 815,
     815, 685, 667, 255, 574, 574, 574, 574, 574, 574, 255, 444, 444, 444, 444, 444, 333, 333, 333, 333, 500, 611,
     500, 500, 500, 500, 500, 606, 333, 611, 611, 611, 611, 500, 574, 500},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 287, 296, 333, 574, 574, 833, 852, 241, 389, 389, 500, 606,
     278, 333, 278, 278, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 278, 278, 606, 606, 606, 500, 747, 759,
     778, 778, 833, 759, 722, 833, 870, 444, 648, 815, 722, 981, 833, 833, 759, 833, 815, 667, 722, 833, 759, 981,
     722, 722, 667, 389, 606, 389, 606, 500, 241, 611, 648, 556, 667, 574, 389, 611, 685, 370, 352, 667, 352, 963,
     685, 611, 667, 648, 519, 500, 426, 685, 611, 889, 611, 611, 537, 389, 606, 389, 606, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 296, 574, 574, 167, 574, 606, 500, 574, 747, 481, 500, 606, 333, 747, 685,
     400, 606, 344, 344, 278, 685, 747, 606, 241, 344, 481, 500, 861, 861, 861, 500, 759, 759, 759, 759, 759, 759,
     333, 778, 759, 759, 759, 759, 444, 444, 444, 444, 833, 833, 833, 833, 833, 833, 833, 606, 255, 833, 833, 833,
     833, 722, 759, 255, 611, 611, 611, 611, 611, 611, 255, 556, 574, 574, 574, 574, 370, 370, 370, 370, 611, 685,
     611, 611, 611, 611, 611, 606, 352, 685, 685, 685, 685, 611, 667, 611},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 287, 333, 400, 574, 574, 889, 889, 259, 407, 407, 500, 606,
     287, 333, 287, 278, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 287, 287, 606, 606, 606, 481, 747, 741,
     759, 759, 833, 741, 704, 815, 870, 444, 667, 778, 704, 944, 852, 833, 741, 833, 796, 685, 722, 833, 741, 944,
     741, 704, 704, 407, 606, 407, 606, 500, 259, 667, 611, 537, 667, 519, 389, 611, 685, 389, 370, 648, 389, 944,
     685, 574, 648, 630, 519, 481, 407, 685, 556, 833, 574, 519, 519, 407, 606, 407, 606, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 333, 574, 574, 167, 574, 606, 500, 574, 747, 481, 481, 606, 278, 747, 685,
     400, 606, 344, 344, 287, 685, 650, 606, 259, 344, 481, 481, 861, 861, 861, 481, 741, 741, 741, 741, 741, 741,
     333, 759, 741, 741, 741, 741, 444, 444, 444, 444, 833, 852, 833, 833, 833, 833, 833, 606, 255, 833, 833, 833,
     833, 704, 741, 255, 667, 667, 667, 667, 667, 667, 255, 537, 519, 519, 519, 519, 389, 389, 389, 389, 574, 685,
     574, 574, 574, 574, 574, 606, 389, 685, 685, 685, 685, 519, 648, 519},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 277, 295, 309, 554, 554, 775, 757, 351, 369, 369, 425, 606,
     277, 332, 277, 437, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 277, 277, 606, 606, 606, 591, 867, 740,
     574, 813, 744, 536, 485, 872, 683, 226, 482, 591, 462, 919, 740, 869, 592, 871, 607, 498, 426, 655, 702, 960,
     609, 592, 480, 351, 605, 351, 606, 500, 351, 683, 682, 647, 685, 650, 314, 673, 610, 200, 203, 502, 200, 938,
     610, 655, 682, 682, 301, 388, 339, 608, 554, 831, 480, 536, 425, 351, 672, 351, 606, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 295, 554, 554, 166, 554, 672, 615, 554, 747, 502, 425, 606, 251, 747, 485,
     400, 606, 332, 332, 277, 608, 564, 606, 354, 332, 484, 425, 831, 831, 831, 591, 740, 740, 740, 740, 740, 740,
     453, 813, 536, 536, 536, 536, 226, 226, 226, 226, 790, 740, 869, 869, 869, 869, 869, 606, 255, 655, 655, 655,
     655, 592, 592, 255, 683, 683, 683, 683, 683, 683, 255, 647, 650, 650, 650, 650, 200, 200, 200, 200, 655, 610,
     655, 655, 655, 655, 655, 606, 300, 608, 608, 608, 608, 536, 682, 536},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 277, 295, 309, 554, 554, 775, 757, 351, 369, 369, 425, 606,
     277, 332, 277, 437, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 277, 277, 606, 606, 606, 591, 867, 740,
     574, 813, 744, 536, 485, 872, 683, 226, 482, 591, 462, 919, 740, 869, 592, 871, 607, 498, 426, 655, 702, 960,
     609, 592, 480, 351, 605, 351, 606, 500, 351, 683, 682, 647, 685, 650, 314, 673, 610, 200, 203, 502, 200, 938,
     610, 655, 682, 682, 301, 388, 339, 608, 554, 831, 480, 536, 425, 351, 672, 351, 606, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 295, 554, 554, 166, 554, 672, 615, 554, 747, 502, 425, 606, 251, 747, 485,
     400, 606, 332, 332, 277, 608, 564, 606, 354, 332, 484, 425, 831, 831, 831, 591, 740, 740, 740, 740, 740, 740,
     453, 813, 536, 536, 536, 536, 226, 226, 226, 226, 790, 740, 869, 869, 869, 869, 869, 606, 255, 655, 655, 655,
     655, 592, 592, 255, 683, 683, 683, 683, 683, 683, 255, 647, 650, 650, 650, 650, 200, 200, 200, 200, 655, 610,
     655, 655, 655, 655, 655, 606, 300, 608, 608, 608, 608, 536, 682, 536},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 280, 280, 360, 560, 560, 860, 680, 280, 380, 380, 440, 600,
     280, 420, 280, 460, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 280, 280, 600, 600, 600, 560, 740, 740,
     580, 780, 700, 520, 480, 840, 680, 280, 480, 620, 440, 900, 740, 840, 560, 840, 580, 520, 420, 640, 700, 900,
     680, 620, 500, 320, 640, 320, 600, 500, 280, 660, 660, 640, 660, 640, 280, 660, 600, 240, 260, 580, 240, 940,
     600, 640, 660, 660, 320, 440, 300, 600, 560, 800, 560, 580, 460, 340, 600, 340, 600, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 280, 560, 560, 160, 560, 600, 560, 560, 740, 480, 460, 600, 240, 740, 520,
     400, 600, 336, 336, 280, 576, 600, 600, 280, 336, 480, 460, 840, 840, 840, 560, 740, 740, 740, 740, 740, 740,
     480, 780, 520, 520, 520, 520, 280, 280, 280, 280, 742, 740, 840, 840, 840, 840, 840, 600, 255, 640, 640, 640,
     640, 620, 560, 255, 660, 660, 660, 660, 660, 660, 255, 640, 640, 640, 640, 640, 240, 240, 240, 240, 640, 600,
     640, 640, 640, 640, 640, 600, 320, 600, 600, 600, 600, 580, 660, 580},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 280, 280, 360, 560, 560, 860, 680, 280, 380, 380, 440, 600,
     280, 420, 280, 460, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 280, 280, 600, 600, 600, 560, 740, 740,
     580, 780, 700, 520, 480, 840, 680, 280, 480, 620, 440, 900, 740, 840, 560, 840, 580, 520, 420, 640, 700, 900,
     680, 620, 500, 320, 640, 320, 600, 500, 280, 660, 660, 640, 660, 640, 280, 660, 600, 240, 260, 580, 240, 940,
     600, 640, 660, 660, 320, 440, 300, 600, 560, 800, 560, 580, 460, 340, 600, 340, 600, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 280, 560, 560, 160, 560, 600, 560, 560, 740, 480, 460, 600, 240, 740, 520,
     400, 600, 336, 336, 280, 576, 600, 600, 280, 336, 480, 460, 840, 840, 840, 560, 740, 740, 740, 740, 740, 740,
     480, 780, 520, 520, 520, 520, 280, 280, 280, 280, 742, 740, 840, 840, 840, 840, 840, 600, 255, 640, 640, 640,
     640, 620, 560, 255, 660, 660, 660, 660, 660, 660, 255, 640, 640, 640, 640, 640, 240, 240, 240, 240, 640, 600,
     640, 640, 640, 640, 640, 600, 320, 600, 600, 600, 600, 580, 660, 580},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 278, 371, 500, 500, 840, 778, 278, 333, 333, 389, 606,
     250, 333, 250, 606, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 250, 250, 606, 606, 606, 444, 747, 778,
     611, 709, 774, 611, 556, 763, 832, 337, 333, 726, 611, 946, 831, 786, 604, 786, 668, 525, 613, 778, 722, 1000,
     667, 667, 667, 333, 606, 333, 606, 500, 278, 500, 553, 444, 611, 479, 333, 556, 582, 291, 234, 556, 291, 883,
     582, 546, 601, 560, 395, 424, 326, 603, 565, 834, 516, 556, 500, 333, 606, 333, 606, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 278, 500, 500, 167, 500, 606, 500, 500, 747, 500, 500, 606, 331, 747, 608,
     400, 606, 300, 300, 250, 603, 628, 606, 278, 300, 500, 500, 750, 750, 750, 444, 778, 778, 778, 778, 778, 778,
     333, 709, 611, 611, 611, 611, 337, 337, 337, 337, 774, 831, 786, 786, 786, 786, 786, 606, 255, 778, 778, 778,
     778, 667, 604, 255, 500, 500, 500, 500, 500, 500, 255, 444, 479, 479, 479, 479, 287, 287, 287, 287, 546, 582,
     546, 546, 546, 546, 546, 606, 291, 603, 603, 603, 603, 556, 601, 556},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 333, 500, 500, 500, 889, 778, 278, 333, 333, 389, 606,
     250, 333, 250, 296, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 250, 250, 606, 606, 606, 500, 747, 722,
     611, 667, 778, 611, 556, 722, 778, 333, 333, 667, 556, 944, 778, 778, 611, 778, 667, 556, 611, 778, 722, 944,
     722, 667, 667, 333, 606, 333, 606, 500, 278, 444, 463, 407, 500, 389, 278, 500, 500, 278, 278, 444, 278, 778,
     556, 444, 500, 463, 389, 389, 333, 556, 500, 722, 500, 500, 444, 333, 606, 333, 606, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 333, 500, 500, 167, 500, 606, 500, 500, 747, 500, 500, 606, 333, 747, 545,
     400, 606, 300, 300, 250, 556, 500, 500, 278, 300, 500, 500, 750, 750, 750, 500, 722, 722, 722, 722, 722, 722,
     333, 667, 611, 611, 611, 611, 333, 333, 333, 333, 778, 778, 778, 778, 778, 778, 778, 606, 255, 778, 778, 778,
     778, 667, 611, 255, 444, 444, 444, 444, 444, 444, 255, 407, 389, 389, 389, 389, 278, 278, 278, 278, 444, 556,
     444, 444, 444, 444, 444, 606, 278, 556, 556, 556, 556, 500, 500, 500},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,  255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 278,  402, 500, 500, 889, 833, 278, 333, 333, 444, 606,
     250, 333, 250, 296, 500, 500, 500, 500, 500, 500, 500, 500,  500, 500, 250, 250, 606, 606, 606, 444, 747, 778,
     667, 722, 833, 611, 556, 833, 833, 389, 389, 778, 611, 1000, 833, 833, 611, 833, 722, 611, 667, 778, 778, 1000,
     667, 667, 667, 333, 606, 333, 606, 500, 278, 500, 611, 444,  611, 500, 389, 556, 611, 333, 333, 611, 333, 889,
     611, 556, 611, 611, 389, 444, 333, 611, 556, 833, 500, 556,  500, 310, 606, 310, 606, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,  255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 278, 500, 500, 167, 500,  606, 500, 500, 747, 500, 500, 606, 389, 747, 611,
     400, 606, 300, 300, 250, 611, 641, 606, 333, 300, 500, 500,  750, 750, 750, 444, 778, 778, 778, 778, 778, 778,
     333, 722, 611, 611, 611, 611, 389, 389, 389, 389, 833, 833,  833, 833, 833, 833, 833, 606, 255, 778, 778, 778,
     778, 667, 611, 255, 500, 500, 500, 500, 500, 500, 255, 444,  500, 500, 500, 500, 333, 333, 333, 333, 556, 611,
     556, 556, 556, 556, 556, 606, 333, 611, 611, 611, 611, 556,  611, 556},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 333, 500, 500, 500, 889, 833, 278, 333, 333, 444, 606,
     250, 389, 250, 315, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 250, 250, 606, 606, 606, 444, 833, 722,
     667, 685, 778, 611, 556, 778, 778, 389, 389, 722, 611, 944, 778, 833, 667, 833, 722, 556, 611, 778, 667, 1000,
     722, 611, 667, 333, 606, 333, 606, 500, 278, 556, 537, 444, 556, 444, 333, 500, 556, 333, 333, 556, 333, 833,
     556, 556, 556, 537, 389, 444, 389, 556, 556, 833, 500, 556, 500, 333, 606, 333, 606, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 333, 500, 500, 167, 500, 606, 556, 500, 747, 500, 500, 606, 333, 747, 611,
     400, 606, 300, 300, 250, 556, 556, 606, 250, 300, 500, 500, 750, 750, 750, 444, 722, 722, 722, 722, 722, 722,
     333, 685, 611, 611, 611, 611, 389, 389, 389, 389, 778, 778, 833, 833, 833, 833, 833, 606, 255, 778, 778, 778,
     778, 611, 667, 255, 556, 556, 556, 556, 556, 556, 255, 444, 444, 444, 444, 444, 333, 333, 333, 333, 556, 556,
     556, 556, 556, 556, 556, 606, 333, 556, 556, 556, 556, 556, 556, 556},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 220, 280, 220, 440, 440, 680, 780, 240, 260, 220, 420, 520,
     220, 280, 220, 340, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 260, 240, 520, 520, 520, 380, 700, 620,
     600, 520, 700, 620, 580, 620, 680, 380, 400, 660, 580, 840, 700, 600, 540, 600, 600, 460, 500, 740, 640, 880,
     560, 560, 620, 240, 480, 320, 520, 500, 240, 420, 420, 340, 440, 340, 320, 400, 440, 240, 220, 440, 240, 620,
     460, 400, 440, 400, 300, 320, 320, 460, 440, 680, 420, 400, 440, 240, 520, 240, 520, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 280, 440, 440, 60,  440, 520, 420, 440, 740, 340, 340, 520, 260, 740, 520,
     400, 520, 264, 264, 220, 460, 500, 600, 180, 264, 360, 380, 660, 660, 660, 400, 620, 620, 620, 620, 620, 620,
     440, 520, 620, 620, 620, 620, 380, 380, 380, 380, 700, 700, 600, 600, 600, 600, 600, 520, 255, 740, 740, 740,
     740, 560, 540, 255, 420, 420, 420, 420, 420, 420, 255, 340, 340, 340, 340, 340, 240, 240, 240, 240, 400, 460,
     400, 400, 400, 400, 400, 520, 300, 460, 460, 460, 460, 400, 440, 400},
    {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,  255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 278, 974, 961, 974, 980, 719, 789,  790, 791, 690, 960, 939,
     549, 855, 911, 933, 911, 945, 974, 755, 846, 762, 761, 571, 677, 763, 760, 759, 754,  494, 552, 537, 577, 692,
     786, 788, 788, 790, 793, 794, 816, 823, 789, 841, 823, 833, 816, 831, 923, 744, 723,  749, 790, 792, 695, 776,
     768, 792, 759, 707, 708, 682, 701, 826, 815, 789, 789, 707, 687, 696, 689, 786, 787,  713, 791, 785, 791, 873,
     761, 762, 762, 759, 759, 892, 892, 788, 784, 438, 138, 277, 415, 392, 392, 668, 668,  255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,  255, 255, 255, 255, 255,
     255, 255, 255, 255, 255, 255, 255, 732, 544, 544, 910, 667, 760, 760, 776, 595, 694,  626, 788, 788, 788, 788,
     788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788,  788, 788, 788, 788, 788,
     788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 894, 838, 1016, 458, 748, 924, 748, 918,
     927, 928, 928, 834, 873, 828, 924, 924, 917, 930, 931, 463, 883, 836, 836, 867, 867,  696, 696, 874, 255, 874,
     760, 946, 771, 865, 771, 888, 967, 888, 831, 873, 927, 970, 918, 255}};

static int descenders[31] = {-217, -205, -205, -205, -207, -207, -207, -207, -157, -157, -142,
                             -142, -205, -228, -212, -212, -213, -205, -205, -205, -205, -192,
                             -192, -185, -185, -281, -276, -258, -271, -314, -205};

static int caps[31] = {662, 653, 676, 669, 718, 718, 718, 718, 562, 562, 562, 562, 667, 681, 681, 681,
                       681, 722, 722, 722, 722, 740, 740, 740, 740, 692, 692, 681, 681, 587, 692};

void gks_lookup_afm(int font, int chr, stroke_data_t *s)
{
  int psfont;

  psfont = abs(font) - 1;
  if (chr < 0) chr += 256;
  if (chr == '-') chr = '+';

  if (psfont >= 100 && psfont <= 130)
    psfont -= 100;
  else if (psfont >= 0 && psfont <= 31)
    psfont = psmap[psfont] - 1;
  else
    psfont = 8;

  s->left = 0;
  s->right = widths[psfont][chr % 256];
  s->size = caps[psfont];
  s->bottom = descenders[psfont];
  s->base = 0;
  s->cap = s->size;
  s->top = s->cap + 120;
}
